<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <script src="./lib/vue-router-3.0.1.js"></script>

    <style>
        html,
        body {
            margin: 0;
            padding: 0;
        }
        
        .left {
            flex: 2;
            background-color: yellow;
        }
        
        .main {
            flex: 8;
            background-color: orange;
        }
        
        .header {
            height: 100px;
            background-color: pink;
        }
        
        .container {
            display: flex;
            height: 600px;
        }
    </style>
</head>

<body>
    <template id="header">
        <div>
            header
        </div>
    </template>

    <template id="left">
        <div>
            left
        </div>
    </template>

    <template id="main">
        <div>
            main
        </div>
    </template>
    <div id="app">
        <router-view class="header"></router-view>
        <div class="container">
            <router-view name="left" class="left"></router-view>
            <router-view name="main" class="main"></router-view>
        </div>
    </div>

    <script>
        const header = {
            template: "#header"
        }
        const left = {
            template: "#left"
        }
        const main = {
            template: "#main"
        }
        const router = new VueRouter({
            routes: [{
                path: "/",
                components: {
                    default: header,
                    left: left,
                    main: main
                }
            }]
        })
        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {},
            router
        });
    </script>
</body>

</html>